﻿/*
 * @Descripttion: 文件描述
 * @version: 文件版本
 * @Author: jinsc
 * @Date: 2022-04-01 14:51:03
 * @LastEditors: Jinsc
 * @LastEditTime: 2022-11-24 23:16:41
 * @FilePath: /lvgl_city_weather/components/lvgl_porting/lv_mount_cus_font.c
 */
#include "lvgl_porting/lv_mount_cus_font.h"
 //本文件是用于挂载自定义字体的文件

LV_FONT_DECLARE(lv_siyuanheiti_23)	//挂载字体
lv_style_t font_style_siyuanheiti_23;

LV_FONT_DECLARE(lv_siyuanheiti_28)	//挂载字体
lv_style_t font_style_siyuanheiti_28;

LV_FONT_DECLARE(lv_siyuan_Medium_51)	//挂载字体
lv_style_t font_style_siyuan_Medium_51;

LV_FONT_DECLARE(lv_DigifaceWide_98)	//挂载字体
lv_style_t font_style_DigifaceWide_98;

LV_FONT_DECLARE(lv_test_font)
lv_style_t font_style_test_font;

void lv_mount_cus_font(void)
{
    /*挂载字体*/

    extern int siyuanheiti_23_flash_fs_init(void);
    if( siyuanheiti_23_flash_fs_init() == 0)
    {
        lv_style_init(&font_style_siyuanheiti_23);
        lv_style_set_text_font(&font_style_siyuanheiti_23, &lv_siyuanheiti_23);
    }

    extern int siyuanheiti_28_flash_fs_init(void);
    if( siyuanheiti_28_flash_fs_init() == 0 )
    {
        lv_style_init(&font_style_siyuanheiti_28);
        lv_style_set_text_font(&font_style_siyuanheiti_28, &lv_siyuanheiti_28);
    }

    extern int siyuan_Medium_51_flash_fs_init(void);
    if( siyuan_Medium_51_flash_fs_init() == 0 )
    {
        lv_style_init(&font_style_siyuan_Medium_51);
        lv_style_set_text_font(&font_style_siyuan_Medium_51, &lv_siyuan_Medium_51);
    }


    lv_style_init(&font_style_DigifaceWide_98);
    lv_style_set_text_font(&font_style_DigifaceWide_98, &lv_DigifaceWide_98);

    lv_style_init(&font_style_test_font);
    lv_style_set_text_font(&font_style_test_font, &lv_test_font);
}
